package com.s_recycler.adapter;

import android.widget.ImageView;
import android.widget.TextView;

import com.s7.recycler.adapter.BaseLoadingAdapter;
import com.s7.recycler.holder.BaseViewHolder;
import com.s_recycler.MyApp;
import com.s_recycler.R;
import com.s_recycler.bean.LoadBean;


public class LoadAdapter extends BaseLoadingAdapter<LoadBean> {
    @Override
    protected int getLayoutId() {
        return R.layout.load_item;
    }

    @Override
    protected void bindData(BaseViewHolder holder, int position, LoadBean data) {
        TextView textView = holder.findViewById(R.id.staggered_text);
        MyApp.getInstance().setStaggeredImage(data.getUrl(), (ImageView) holder.findViewById(R.id.staggered_image));
        textView.setText(data.getName());
    }
}
